import request from '@/utils/request'

// 此接口用于首页轮播图以及分类商品页面轮播图，根据传的distributionSite参数，为1则为首页接口，为2则为商品分类页接口
export function getBannerApi(params = {}) {
    return request({
        url: '/home/banner',
        params: {
            distributionSite: params.distributionSite || 1
        }
    })
}

export function getNewsApi() {
    return request({
        url: '/home/new'
    })
}

export function getHotApi() {
    return request({
        url: '/home/hot'
    })
}

export function getGoodsApi() {
    return request({
        url: '/home/goods'
    })
}